package yb.ecp.fast.user.web.internal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import yb.ecp.fast.infra.infra.ActionResult;
import yb.ecp.fast.user.infra.BasicController;
import yb.ecp.fast.user.service.ProfileService;


@RestController
@RequestMapping("/internal")
public class UserController extends BasicController {

	@Autowired
	private ProfileService profileService;
	
	@RequestMapping(value="userInfo", method=RequestMethod.GET)
	public ActionResult userInfo(String username) {
		return actionResult(profileService.getUserInfoByName(username));
	}
}
